package com.foxire.interface2;

public class Test {
    public static void main(String[] args) {
        // 目标：去理解Java接口的好处，用处
        People p = new Student();
        Driver d = new Student();
        BoyFriend t = new Student();

        // 接口可以实现面向接口编程，更利于解耦合。
        Driver a = new Student();
    }
}

interface Driver{}
interface BoyFriend{}

class People{}
class Student extends People implements Driver, BoyFriend{}

class Teacher implements Driver{}